<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>预定义常量</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="intl.resources.html">« 资源类型</a></li>
      <li style="float: right;"><a href="intl.examples.html">范例 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.intl.html">intl</a></li>
    <li>预定义常量</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="intl.constants" class="appendix">
 <h1>预定义常量</h1>

 <p class="para">
  <dl>
   
    <dt id="constant.intl-icu-version">
     <strong><code>INTL_ICU_VERSION</code></strong>
     (<span class="type">string</span>)
    </dt>

    <dd>

     <span class="simpara">
      The current ICU library version as a dotted-decimal string. 
     </span>
    </dd>

   
   
    <dt id="constant.intl-max-locale-len">
     <strong><code>INTL_MAX_LOCALE_LEN</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Limit on locale length, set to 80 in PHP code. Locale names longer 
      than this limit will not be accepted.
     </span>
    </dd>

   
   
    <dt id="constant.idna-default">
     <strong><code>IDNA_DEFAULT</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Prohibit processing of unassigned codepoints in the input for IDN
      functions and do not check if the input conforms to domain name ASCII rules.
     </span>
    </dd>

   
   
    <dt id="constant.idna-allow-unassigned">
     <strong><code>IDNA_ALLOW_UNASSIGNED</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Allow processing of unassigned codepoints in the input for IDN functions.
     </span>
    </dd>

   
   
    <dt id="constant.idna-use-std3-rules">
     <strong><code>IDNA_USE_STD3_RULES</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Check if the input for IDN functions conforms to domain name ASCII rules.
     </span>
    </dd>

   
   
    <dt id="constant.idna-check-bidi">
     <strong><code>IDNA_CHECK_BIDI</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Check whether the input conforms to the BiDi rules.
      Ignored by the IDNA2003 implementation, which always performs this check.
     </span>
    </dd>

   
   
    <dt id="constant.idna-check-contextj">
     <strong><code>IDNA_CHECK_CONTEXTJ</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Check whether the input conforms to the CONTEXTJ rules.
      Ignored by the IDNA2003 implementation, as this check is new in IDNA2008.
     </span>
    </dd>

   
   
    <dt id="constant.idna-nontransitional-to-ascii">
     <strong><code>IDNA_NONTRANSITIONAL_TO_ASCII</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Option for nontransitional processing in
      <span class="function"><a href="function.idn-to-ascii.html" class="function">idn_to_ascii()</a></span>. Transitional processing is activated
      by default. This option is ignored by the IDNA2003 implementation.
     </span>
    </dd>

   
   
    <dt id="constant.idna-nontransitional-to-unicode">
     <strong><code>IDNA_NONTRANSITIONAL_TO_UNICODE</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Option for nontransitional processing in
      <span class="function"><a href="function.idn-to-utf8.html" class="function">idn_to_utf8()</a></span>. Transitional processing is activated
      by default. This option is ignored by the IDNA2003 implementation.
     </span>
    </dd>

   
   
    <dt id="constant.intl-idna-variant-2003">
     <strong><code>INTL_IDNA_VARIANT_2003</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Use IDNA 2003 algorithm in <span class="function"><a href="function.idn-to-utf8.html" class="function">idn_to_utf8()</a></span> and
      <span class="function"><a href="function.idn-to-ascii.html" class="function">idn_to_ascii()</a></span>. This is the default.
      This constant and using the default has been deprecated as of PHP 7.2.0.
     </span>
    </dd>

   
   
    <dt id="constant.intl-idna-variant-uts46">
     <strong><code>INTL_IDNA_VARIANT_UTS46</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Use UTS #46 algorithm in <span class="function"><a href="function.idn-to-utf8.html" class="function">idn_to_utf8()</a></span> and
      <span class="function"><a href="function.idn-to-ascii.html" class="function">idn_to_ascii()</a></span>.
      Available as of ICU 4.6.
     </span>
    </dd>

   
   
    <dt id="constant.idna-error-empty-label">
     <strong><code>IDNA_ERROR_EMPTY_LABEL</code></strong> (<span class="type">int</span>)
    </dt>

    <dt>

     <strong><code>IDNA_ERROR_LABEL_TOO_LONG</code></strong> (<span class="type">int</span>)
    </dt>

    <dt>

     <strong><code>IDNA_ERROR_DOMAIN_NAME_TOO_LONG</code></strong> (<span class="type">int</span>)
    </dt>

    <dt>

     <strong><code>IDNA_ERROR_LEADING_HYPHEN</code></strong> (<span class="type">int</span>)
    </dt>

    <dt>

     <strong><code>IDNA_ERROR_TRAILING_HYPHEN</code></strong> (<span class="type">int</span>)
    </dt>

    <dt>

     <strong><code>IDNA_ERROR_HYPHEN_3_4</code></strong> (<span class="type">int</span>)
    </dt>

    <dt>

     <strong><code>IDNA_ERROR_LEADING_COMBINING_MARK</code></strong>
     (<span class="type">int</span>)
    </dt>

    <dt>

     <strong><code>IDNA_ERROR_DISALLOWED</code></strong> (<span class="type">int</span>)
    </dt>

    <dt>

     <strong><code>IDNA_ERROR_PUNYCODE</code></strong> (<span class="type">int</span>)
    </dt>

    <dt>

     <strong><code>IDNA_ERROR_LABEL_HAS_DOT</code></strong> (<span class="type">int</span>)
    </dt>

    <dt>

     <strong><code>IDNA_ERROR_INVALID_ACE_LABEL</code></strong> (<span class="type">int</span>)
    </dt>

    <dt>

     <strong><code>IDNA_ERROR_BIDI</code></strong> (<span class="type">int</span>)
    </dt>

    <dt>

     <strong><code>IDNA_ERROR_CONTEXTJ</code></strong> (<span class="type">int</span>)
    </dt>

    <dd>

     <span class="simpara">
      Errors reported in a bitset returned by the UTS #46 algorithm in
      <span class="function"><a href="function.idn-to-utf8.html" class="function">idn_to_utf8()</a></span> and
      <span class="function"><a href="function.idn-to-ascii.html" class="function">idn_to_ascii()</a></span>.
     </span>
    </dd>

   
  </dl>

 </p>
</div>
</div></div></body></html>